package com.starleague.battletech.game;

import java.util.Map;

import com.starleague.game.AbstractTeam;

public abstract class AbstractBattletechTeam
        extends AbstractTeam
        implements IMutableBattletechTeam
{
    private AbstractBattletechGame game;
    private int initiativeRoll;
    private int unitsToMove;

    protected AbstractBattletechTeam(AbstractBattletechGame game,
                                     String name)
    {
        super(name);
        this.game = game;
    }

    protected AbstractBattletechTeam()
    {
        //
    }

    @Override
    public AbstractBattletechGame getGame()
    {
        return this.game;
    }

    @Override
    public int getInitiativeRoll()
    {
        return this.initiativeRoll;
    }

    @Override
    public void setInitiativeRoll(int initiativeRoll)
    {
        this.initiativeRoll = initiativeRoll;
    }

    @Override
    public int getUnitsToMove()
    {
        return this.unitsToMove;
    }

    @Override
    public void setUnitsToMove(int unitsToMove)
    {
        this.unitsToMove = unitsToMove;
    }

    @Override
    public Map<String, Object> infoProperties()
    {
        Map<String, Object> infoPropertyMap = super.infoProperties();
        infoPropertyMap.put("initiativeRoll", this.initiativeRoll);
        infoPropertyMap.put("unitsToMove", this.unitsToMove);
        return infoPropertyMap;
    }
}
